<%@ page import="java.util.*;" %>
<html>


	<body>
	<%
		ArrayList list = (ArrayList)request.getAttribute("circularNumbersBasedOnServiceNumber"); 
		System.out.println("list:"+list);
		if("ServiveNumbersData".equals(request.getAttribute("ServiveNumbersData"))){
			if(null != list && !list.isEmpty()){
				Iterator iterator = list.iterator();
				
		%>
			<table width="100%" cellpadding = '3' cellspacing="0" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle" >
				<tr>
					<td style="padding-left:3px;padding-right:3px;padding-bottom:3px;padding-top:3px" width = "25%" ><h2>Question Number</h2></td>
					<td style="padding-left:3px;padding-right:3px;padding-bottom:3px;padding-top:3px" width = "75%" >
						 <select id="circularNumber123"  name="circularNumber123" onchange="OnSelectionFAQNumberChange(this)">
					        <option value="-1">-----------------------Select One--------------------</option>
					        <%while(iterator.hasNext())
					        {
								String ss;
								ss=iterator.next().toString();
							%>
					         <option value= "<%= ss %>" ><%=ss %></option> 
					         <%} %>
							
					    </select>
					   
					</td>
	 			</tr>
			</table>
			<%}else{ %>
			
			<table width="100%" cellpadding = '3' cellspacing="0" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle" >
				<tr>
					<td style="padding-left:3px;padding-right:3px;padding-bottom:3px;padding-top:3px" width = "600px" colspan='2' ><h2><font color='red'>
					No Question Numbers are available to this Service.</font></h2></td>
	 			</tr>
			</table>
			
			<%}}else if("CircularNumbersData".equals(request.getAttribute("ServiveNumbersData"))){
				String arr1[]=(String[])request.getAttribute("arr");
				
				%>
				
				<table width="100%" cellpadding = '3' cellspacing="0" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
			<tr>
				<td style="padding-left:3px;padding-right:3px;padding-bottom:3px;padding-top:3px" width = "25%"><h2>Date of Circular</h2></td>
				<td style="padding-left:3px;padding-right:3px;padding-bottom:3px;padding-top:3px" width = "75%" >
				 <select name="dateOfCircular121" id="dateOfCircular121" onchange="OnSelectionCircularNumberDateAndServicenumberChange (this)">
					        <option value="-1">-----------------------Select One--------------------</option>
					        <% for(int i=0; i<arr1.length; i++){
								
								if(null != arr1[i]){
								
								//String temp[]=arr1[i].split("~");
							
							%>
					        <option value= "<%= arr1[i] %>" ><%=arr1[i] %></option> 
					        <%}} %>
				</select></td>
			</tr>
			</table>
			<%}else if("circularNumberDetailsBasedOnServicenumberAndCircularDate".equals(request.getAttribute("ServiveNumbersData"))){%>
			<table border="0" width="100%" cellpadding = '3' cellspacing="0" align="center" border="0" cellspacing ="0" cellpadding="0" valign="middle">
			<tr>
				<td style="padding-left:3px;padding-right:3px;padding-bottom:3px;padding-top:3px" width = "25%" ><h2>Question </h2></td>
				<td style="padding-left:3px;padding-right:3px;padding-bottom:3px;padding-top:3px" width = "75%" ><textarea name="question" id="question" rows="5" cols="70" ><%=request.getAttribute("circular_subject")%></textarea></td>
			</tr>
			
			<tr>
				<td style="padding-left:3px;padding-right:3px;padding-bottom:3px;padding-top:3px" width = "25%" ><h2>Answer</h2></td>
				<td style="padding-left:3px;padding-right:3px;padding-bottom:3px;padding-top:3px" width = "75%" ><textarea  rows="5" cols="70"  name="answer" id="answer" ><%=request.getAttribute("CircularDate12")%></textarea></td>
			</tr>
			
			<tr>
			 	<td style="padding-left:3px;padding-right:3px;padding-bottom:3px;padding-top:3px" colspan="2" width = "600px" ><input type="button" name="updateCircular" id="updateCircular" value="update" onclick="UpdateFAQFunction()"/></td>		
			</tr>
			</table>
			<%} %>
	</body>
</html>